import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import type { AppModule } from '~/types'

// 创建并导出pinia实例
export const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

// Setup Pinia
// https://pinia.vuejs.org/
export const install: AppModule = (app) => {
  app.use(pinia)
}
